package com.help.service.impl;

import com.common.tool.StringTool;
import com.help.domain.pojo.HelpTag;
import com.help.mapper.HelpTagMapper;
import com.help.service.IHelpTagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 * 帮助标签表 服务实现类
 * </p>
 *
 * @author 小杰大人
 * @since 2025-10-08
 */
@Service
public class HelpTagServiceImpl extends ServiceImpl<HelpTagMapper, HelpTag> implements IHelpTagService {

    @Override
    public List<String> getHelpTagNamesByIds(String tagIds) {
        List<Long> ids = StringTool.convertIdsToList(tagIds);
        if (ids == null || ids.isEmpty()){
            return Collections.emptyList();
        }
        return baseMapper.getTagNamesByIds(ids);
    }
}
